#ifndef _TM1638_H_
#define _TM1638_H_

#define TM1638_PORT GPIOD
#define TM1638_STB  GPIO_PIN_7
#define TM1638_CLK  GPIO_PIN_5
#define TM1638_DIO  GPIO_PIN_3

extern void TM1638_Init(void);
extern void TM1638_WriteByte(uint8_t data);
extern uint8_t TM1638_ReadByte(void);
extern void TM1638_WriteCmd(uint8_t cmd);
extern uint8_t TM1638_ReadKey(void);
extern void TM1638_WriteReg(uint8_t addr, uint8_t data);
extern void TM1638_LED_Ctrl(uint8_t num, uint8_t status);

#endif
